package com.examination.exception;

import com.examination.enums.AppHttpCodeEnum;
import lombok.Getter;

/**
 * 统一异常处理
 */
public class MySystemException extends RuntimeException{

    private int code;

    private String msg;

    public MySystemException(AppHttpCodeEnum httpCodeEnum) {
        super(httpCodeEnum.getMsg());
        this.code = httpCodeEnum.getCode();
        this.msg = httpCodeEnum.getMsg();
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
